<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <script src="../../plugins/jquery-2.1.0.js"></script>
    <script src="../../plugins/element-ui/vue.js"></script>
    <script src="../../plugins/element-ui/index.js"></script>
    <script src="../../plugins/layer/layer.js"></script>
    <link rel="stylesheet" href="../../plugins/element-ui/index.css" / >
    <script src="js/file_table.js"></script>
    <title>Docker管理</title>
</head>

<body>
<div id="tb_vu">

    <el-table :data="file_data" stripe style="width: 100%">
    	<el-table-column prop="yfileid" label="文件ID" width="180">
    	<template slot-scope="scope">
					<a style='cursor:pointer;' 
						 v-bind:title='scope.row.yfileid' 
						v-bind:tag='scope.row.yfileid'>
						{{ scope.row.yfileid }}
					</a>
		</template>
        </el-table-column>

        <el-table-column prop="filename" label="文件名" width="180">
        	    	<template slot-scope="scope">
					<a style='cursor:pointer;' 
						 v-bind:title='scope.row.filename' 
						v-bind:tag='scope.row.filename'>
						{{ scope.row.filename}}
					</a>
		</template>
        </el-table-column>
        <el-table-column prop="fileurl" label="文件地址">
        	    	<template slot-scope="scope">
					<a style='cursor:pointer;' 
						 v-bind:title='scope.row.fileurl' 
						v-bind:tag='scope.row.fileurl'>
						{{ scope.row.fileurl }}
					</a>
		</template>
        </el-table-column>
        
  <el-table-column width="50" label="操作" >
		<template slot-scope="scope">
			<el-dropdown >
				<span class="el-dropdown-link">
                  <i class="el-icon-more"></i>
                 </span>
				<el-dropdown-menu slot="dropdown">
					<el-dropdown-item command="a" @click.native="re_file(scope.$index, scope.row)">
						删除
					</el-dropdown-item>
					<el-dropdown-item command="b" @click.native="edit_file(scope.$index, scope.row)">
						编辑							
					</el-dropdown-item>
				</el-dropdown-menu>
			</el-dropdown>
		</template>
	</el-table-column>	
    </el-table>
    
    <div class="block" style="margin-top:10px; " v-if="files_total > 10 ">
			<el-pagination v-bind:current-page.sync="file_page" 
				v-bind:page-sizes="[10, 20, 30, 100]" 
				v-bind:page-size="file_size" 
				@size-change="Change_fileSize" 
				@current-change="Change_filepage" 
				layout="total, sizes, prev, pager, next, jumper" 
				v-bind:total="file_total">
			</el-pagination>
	</div>
</div>

<script>
    var dp = new file_table();
    dp.pageInit();
</script>
</body>

</html>